package week8;

public class Bicycle extends Transport{
    private boolean hasGears;
    public Bicycle(String name,int speed,boolean hasGears){
        super(name,speed);
        this.hasGears=hasGears;
    }
  // public Bicycle(){}
  // public boolean HasGears(){
  //     return hasGears;
  // }
  // public void setHasGears(boolean hasGears){
  //     this.hasGears=hasGears;
  // }
    @Override
    public void showInfo() {
        super.showInfo();
        System.out.println(super.getName()+hasGears+"齿轮");
    }
}
